<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="UTF-8"/>
    <title></title>
    <link th:href="@{~/static/css/common.css}" rel="stylesheet" />
    <style type="text/css">
    	#staffList td a{margin: 0 25px}
    	
    	form{border: 1px gray solid;}
    </style>
</head>
<body>
	<div th:include="/common/head"></div>
	
	<section id="main">
		<form action="/staff/list" method="get">
			<input type="hidden" name="pageNo" value="1"/>
			<div>
				员工号：<input name="staffNum" th:value="${staffNum}"/>
			</div>
			<div>
				姓名：<input name="name" th:value="${name}"/>
			</div>
			<div>
				
				职位：<select name="positionID" id="positionID">
							<option value="-1">--请选择--</option>
							<option  th:selected="${positionID eq p.valueId}" th:each="p:${pList}"  th:value="${p.valueId}" th:text="${p.valueName}" value="1"></option>
						</select>
			</div>
			<div>
				入园时间：<input name="dateBefore" type="date" th:value="${dateBefore}"/>
				<input name="dateAfter" type="date" th:value="${dateAfter}"/>
			</div>
			<input type="submit" value="查询"/>
		</form>
		<table border="1" style="width: 100%" id="staffList">
			<tr>
				<th>员工号</th>
				<th>姓名</th>
				<th>性别</th>
				<th>手机号</th>
				<th>职位</th>
				<th>管理班级</th>
				<th>入园时间</th>
				<th>操作</th>
			</tr>
			<tr th:each="s : ${sList}">
				<td th:text="${s.staffNum}"></td>
				<td th:text="${s.name}"></td>
				<td th:if="${s.sex==0}">女</td><td th:if="${s.sex==1}">男</td>
				<td th:text="${s.phone}"></td>
				<td th:text="${s.position.valueName}"></td>
				<td th:if="${s.classroom != null}" th:text="|${s.classroom.grade}${s.classroom.num}班|"></td><td th:unless="${s.classroom != null}">无</td>			
				<td th:text="${#dates.format(s.createDate, 'yyyy-MM-dd')}"></td>
				<td>
					<a>修改</a>|<a>删除</a>
				</td>
			</tr>
		</table>
		<div th:include="/common/rollpage"></div>
	</section>

	
</body>
</html>